Homework
Assignment #2:
- Hybrid Object-Oriented Language - C++ and UML
- Option 1:
- Use C++ to mimic the core ideas in LISP. LISP has a basic data structure called an s-expression and allows operations, car, cdr, cons, and eq on this structure. Write code that will allow you to create and operate on LISP lists and s-expressions.
- Option 2:
- Use C++ to mimic the core ideas in either ML, Prolog or APL. This is analagous to option 1 but lets you investigate another language which maybe of interest. Implement a core subset of ideas, but you need not be exhaustive.
- Option 3:
- Use C++ to write a context free grammar generator. Given a grammar generate an arbitrary string in the language automatically. Have some way to avoid infinitely long derivation. In this option state any mathematical constraints on guaranteeing that a string is likely to occur.
- What you need to know to do this problem is a reasonable understanding of C++ and some basic UML. Depending on the option you need to know another language such as LISP or CF grammars at a level described in the course text.
- In each option also use UML to specify at a high level the coding-class design. Briefly report on the value of this experience. Class design and quality of discussion will be important in these problems.
- Due date: in class May 12, 1998.