Assignment 6, CSC430, Fall 2019
1 Goal
2 Teams
3 What to Implement
3.1 Parsing
3.2 Interpretation
4 Time Limit
5 Presentation
6 Scoring
7.5.0.16

Assignment 6, CSC430, Fall 2019

1 Goal

Work with a team to re-do as much of assignment 3 as possible in 5 hours per person using a language we choose for you randomly, and present the results in class.

2 Teams

Teams have been randomly assigned. You should know who is on your team, now. You should also know what language you’ve been assigned. Let me know right away if you don’t know either of these things.

You should probably collaborate using ... Facebook! No, no, I’m just kidding. You should probably use some kind of repository. If you all use github, that’s fine—there’s no need to make the code you write for this project private—but you can also collaborate in other ways. Actually, a github gist might be perfect for this kind of one-file project.

3 What to Implement

Your goal is to implement assignment 3 in the language that you’ve been assigned, and to learn about the language you’ve been assigned.

3.1 Parsing

Some languages are better-suited for parsing than others. For this reason, I strongly suggest doing the parser last, or not doing it at all.

Specifically, most languages don’t have s-expressions, or anything terribly similar. In dynamic languages like JavaScript, Python, and Ruby, you can model these using arrays. So, for instance, in JavaScript you might write

['var', ['z','=',14], ['+', 'z', 'z']]

which is a heck of a lot longer than

{var {z = 14} {+ z z}}

3.2 Interpretation

The interpreter is the important part of the assignment. You should focus on developing a representation of an AST, and writing the interp function.

Please note that you do absolutely have to write some kind of test cases.

4 Time Limit

No person may spend more than five hours implementing this project. This does not include time spent downloading and installing an IDE or compiler, but it does include time spent on "hello world" tutorials and such.

Please note: You are not going to get very far in five hours!

That’s okay. It’s not about completion. It’s about having a good time, getting to know a bit about another language, and thinking a bit about why you might (or might not) choose the language for a project.

It’s also an interesting "sprint" exercise in making the most of a short period of time.

After you’re done implementing, you may spend up to half an hour per person assembling your presentation.

5 Presentation

Rather than handing anything in, you will be making a five-minute presentation of your work in class. You may bring a laptop to make your presentation, or you can just put your presentation on the web (for instance, using google’s presentation documents for google drive).

Your presentation should include several sections.
  • Start with an overview of the language: who designed it, how old is it, how popular is it, what is it good for?

  • Your code. Start with the test cases, starting with small ones presented in a large enough font to be readable from the back of the room. This will help your audience to understand how your code is structured. Then show your data definitions, and finally your functions. This shoud also be about two minutes. You’re not going to get through all the code, so you’ll want to focus on one or two specific tests, a very brief overview of the data definitions, and then a look at the heart of the interpreter. Do not spend more than two minutes on your own code. Practice to keep this section under control.

  • A description of the language’s values: does it have objects? closures? strings? symbols? numbers? Other weird things? Highlight things that are interesting or unusual.

  • A description of the language’s syntax and scoping: are there statements, distinct from expressions? How does the scoping of variables, functions, classes, and methods work? Again, highlight things that are interesting or unusual.

  • If you have any insight into the language’s type system (a topic we haven’t yet studied), you’re welcome to share that.

  • Finally, would you consider taking a job involving writing code in this language?

Your presentation is the only deliverable for this project.

6 Scoring

The scoring will be as follows:
  • 1/3: Your effort score assigned by your teammates

  • 1/3: The quality of your code (not its completeness)

  • 1/3: Your presentation