CS 3520 Homework 1   - Due August 27

This homework is due August 27, 8:00 AM. (Note: that's Monday, not Friday.)

Important: Your code may be shown to the entire class (along with programs from several others) during Monday's lecture.

Exercise 1.1, Create Handin Account

After installing plai+handin.plt as described in the course web page, select the Manage CS 5510 Handin... menu item from DrScheme's File menu. Change to the New User panel, and pick a username and password. (Use your real name and real Utah student ID, so that we can connect your homework submissions with you.)

You will have to install plai+handin.plt for DrScheme on each different filesystem that you use to get a Handin button. However, after creating a handin account once from any machine, you can use DrScheme's Handin button on any other machine.

Exercise 1.2, String-Processing Language

Using a programming language of your choice, implement an interepreter for a little language of string operations. Your interpreted language must include

Also, it must allow arbitrary expressions for the arguments of operations, so that multiple operations can be applied in an expression.

Pick your own syntax and input method; document them in comments and with test cases. Chose a syntax that minimizes parsing effort for your interpreter.

For example, using a fully-parenthesized infix notation where & is the concatenation operator and @ is the rest-after operator, for the program

  (("hello" & " ") & "world")

the interpreter should produce

  "hello world"

and for the program

  (("hello" @ "l") & ("a world" @ "a"))

the interpreter should produce

  "lo world"

Submit your interpreter as a single file using the Handin button in DrScheme (even if you use a programming language other than Scheme). The Handin button submits whatever file you have opened in DrScheme. Of course, when you click Handin, provide the username and password that you chose for exercsie 1.1.

After submitting, you can confirm your submission through the web-based status server:

https://rains.flux.utah.edu:7980/servlets/status.ss

Submitting a plain-text file turns it into a DrScheme-format file, so use DrScheme to read a file that you download from the status server.


Last update: Monday, October 15th, 2007
mflatt@cs.utah.edu