CSci 4607 Computer Language Processing -- Project and other assignments.

[Home] [Syllabus] [Project and other assignments] [Resources]

This page contains description of the project, project assignments and deadlines, and other course assignments.

Project assignments:

General requirements for project assignments

Written assignments can be submitted online via the course Wiki page. Programming assignments will be submitted via CVS.

Important: Each assignment must be accompanied by a brief note describing participation of each team member in the submitted work (if you don't feel comfortable posting such a note on Wiki, you may submit a hand-written note or send me an e-mail, CC to all team members). If all goes well, all team members get the same grade for an assignment. However, if there is a definite disproportion in participation, I reserve the right to grade the work individually.

Since written assignments include a substantial amount of descriptive text, both the contents and the style of the submitted document will be graded. Points may be deducted for spelling and grammatic errors and for text which is hard to understand.

Programming assignments must include comments, authorship notes, and dates of creation/last modification. Proper naming of variables and functions and proper indentation is required. All changes made after previous submissions must be documented.

Project assignment 0. Due Thursday, Sept. 4

Decide whom are you going to do your project with. Project groups can have 2-3 students. Please let me know by e-mail (CC-ed to all members of your project group) before the beginning of the class who is going to be in your group. You can, if you'd like, choose a name for your project group.

Project assignment 1: Problem description, sketch of the language. Due Thursday, Sept. 11

The focus of this assignment is to clearly define a problem you are trying to solve. Specifically, you need to describe the following:
  1. The purpose of the language (briefly).
  2. A typical user of the language (do you assume that the user is familiar with programming? If yes, what programming languages do you expect the user to be comfortable with? If your language is specific to a particular branch of science, such as chemistry, astronomy, etc., or deals with other specialized knowledge, do you expect the user to use specific terminology related to this field in the language you are designing?)
  3. The data that the language will be working with. Be as specific as possible. Examples are a must, but they are not sufficient for a complete description, you need to describe the general case as well. Use BNF if it's helpful.
    This and the next part of the assignment should constitute the major part of your work.
  4. The format of the outcome of the language. Again, you need to describe the general case with all the details and include examples.
  5. Describe the language paradigm that you think would be appropriate for solving this problem. Explain why this is a good choice. If you have considered other ones, please describe those and explain why your decision. If you are still undecided about your paradigm, please summarize your options and explain advantages and disadvantages of each choice.
    You don't need to use terminology given in the book. A well-chosen example of a program execution would suffice.

Project assignment 2: Syntax of the language. Due Thursday, Sept. 25th

The goal of this project phase is to completely define the syntax of the little language. You should focus on two interdependent issues: the formal grammar for the language and the ease of use of the language.

Start by writing examples in your language. Then try to encode the syntax as a formal grammar. Check that the grammar satisfies the requirements below. If it doesn't (or if you find it very difficult to prove that it does), try to come up with a different grammar for the same language. If this fails, then you might want to change the syntax.

Your submission will consist of two parts:

Part 1: Formal grammar. Your grammar must satisfy the following conditions:

  1. It must be context-free (i.e. defined via BNF)
  2. It must be unambiguous (i.e. every statement must have a unique parse tree).
  3. The sub-grammars that describe identifiers, numbers, and similar entities must be regular grammars, since they will be used by the lexical analyzer.
  4. The grammar should be such that you can always choose a production rule by looking ahead no more than one token (see p. 100 of the textbook for details). While you don't need to construct a push-down automaton to recognize the grammar, you should make up a lot of examples and convince yourselves that you grammar satisfies these rules. For instance a variable assignment can be distinguished from a function invocation by the left parenthesis after the function name:
    int n = m;
    int n = m(x);
If your program allows the user to write comments, then include the syntax of comments in the grammar and in the examples.

If you find your grammar to be too complicated, you might try the following simplifications:

Part 2: Examples. You must include at least 5 examples of the language (a few lines of code each). The examples should be different enough to demonstrate various features of the language. You should explain briefly what's the result of the "program" in each of the cases.

When writing examples, make sure that the language is clear, easy to understand, and suitable for the intended users. If it's not, then you should change the syntax.

Things you don't need to worry about at this project stage:

Paper-and-pencil assignments